<?
$cmsDocument2 = new CmsDocument($db);

$cmsDocument->flush();
$cmsDocument->addDocumentType("docCMSWebPge");
$cmsDocument->addConstraint("shortdescription", 4); //Site Group
$cmsDocument->resetIterator();
if ($row = $cmsDocument->nextDocument()) {
?>
<div>
<img src="/cms/images/company_logo.gif" alt="" border="0" style="display:inline;" align="left" />
<br><span style="text-transform: uppercase; font-size: 25px; font-weight:bold; color: #e09d19;letter-spacing: 1px;display:inline;"><?= $row->title; ?></span>
</div>
<br /><br><br>
<!--<img src="/cms/images/mailouts_home.gif" alt="Intranet" width="148" height="73" /><br />-->
<p>
<?= $row->content; ?>
</p>
<br /><br>
<?
}
?>


<div style="clear: both;"></div>
<img src="/cms/images/quick_links.gif" alt="|" width="645" height="22" /><br />
<br />
<table cellspacing="2" cellpadding="5" width="468" align="left" border="0">
<?
$cmsDocument->flush();
$cmsDocument->addDocumentType("docCMSLnkCat");
$cmsDocument->addConstraint("categorycode", "");
$cmsDocument->addConstraint("categorycode", "<< NULL >>", "IS");
$cmsDocument->addConstraint("categorycode", $authInfo->uid);
$cmsDocument->addSort("content + 0");
$cmsDocument->resetIterator();
$tdno = 1;
while ($row = $cmsDocument->nextDocument()) {
	$cmsDocument2->flush();
	$cmsDocument2->addDocumentType("docCMSQuLink");
	$cmsDocument2->addConstraint("categorycode", 4); //Site Group
	$cmsDocument2->addConstraint("author", $row->documentcode);
	$cmsDocument2->addConstraint("organisationalname", "");
	$cmsDocument2->addConstraint("organisationalname", "<< NULL >>", "IS");
	$cmsDocument2->addConstraint("organisationalname", $authInfo->uid);
	$cmsDocument2->addSort("content + 0");
	$cmsDocument2->resetIterator();
	if ($cmsDocument2->totalDocuments()) {
		if ($tdno == 1) {
			echo "<tr>\n";
			echo "  <td width='221' valign='top'>\n";
		}
		else {
			echo "  <td width='221' valign='top'>\n";
		}
		echo "    <center><span style=\"font-family:'Trebuchet MS';color:#6B91AB;font-weight:bold;font-size:11px;\">".magicClean($row->title)."</span></center>";
		echo "    <img alt='".magicClean($row->title)."' src='/cms/images/titleBase.gif' width='221' /><br><br>\n";
	}
	while ($row2 = $cmsDocument2->nextDocument()) {
		echo "    <div style='background-color:#F5F5F5;border: 1px solid white;padding-bottom:3px;'>\n";
		echo "      <a href='".magicclean($row2->shortdescription)."'";
		if ($row2->authorbio) {
			echo " target='_blank'";
		}
		echo ">".magicclean($row2->title)."</a><br />\n";
		echo "      ".magicclean($row2->authordepartment,false)."\n";
		echo "    </div>\n";
	}
	if ($cmsDocument2->totalDocuments()) {
		if ($tdno == 1) {
			echo "  </td>\n";
			$tdno = 2;
		}
		else {
			echo "  </td>\n";
			echo "</tr>\n";
			$tdno = 1;
		}
	}
}
if ($tdno == 2) {
	echo "  <td width='221'>&nbsp;</td>\n";
	echo "</tr>\n";
}
?>
</table>
<div style="clear:both"></div>
    <br />
    <br />    


    <img src="/cms/images/for_assistance.gif" alt="Quick Links" width="645" height="22" /><br />  
<br />
Please contact Gravitate Ltd. Email <a href="mailto:support@gravitate.co.nz">support@gravitate.co.nz</a> or Phone +64 9 309 5015